package com.work.mdass.properties;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.work.mdass.domain.TeachingMaterial;

public interface TeachingMaterialInterface extends JpaRepository<TeachingMaterial, Integer>{

	/*
	 * 通过教材编号查找教材
	 */
/*	public TeachingMaterial findByMaterialSerial(Integer materialSerial);2018.3.18*/
	
	/*
	 * 通过教材名称查找教材
	 */
	public List<TeachingMaterial> findByName(String name);
	/*
	 * 通过教师查找教材
	 */
	public List<TeachingMaterial> findByTName(String tname);
	/*
	 * 通过教材编号查找教材
	 */
	public List<TeachingMaterial> findByCourseSerial(String courseSerial);
	/*
	 * 通过关键字匹配教材名称模糊搜索
	 * @return {name}
	 */
	public List<TeachingMaterial> findByNameLike(String keyWord);
	
	/*
	 * 通过关键字匹配教材名称模糊搜索,教师名称
	 * @return {name,tName}
	 */
	public List<TeachingMaterial> findByTNameAndNameLike(String tName,String keyWord);
}
